This application incorporates by reference Taiwanese application Serial No. 88110695, Filed Jun. 25, 1999.
1. Field of the Invention
The invention relates in general to a method of detecting peripheral components, and more particularly to a method effectively starting the peripheral components connected to Peripheral Component Interconnect (PCI) buses in a computer network and operating system.
2. Description of the Related Art
Owing to the development of the graphics oriented operating system, such as Windows, TM, OS/2 etc., a bottleneck between the processor and the display peripheral component emerges in the standard Input/Output (I/O) of the Personal Computer (PC). Therefore, local buses are utilized by PC designs to connect the high bandwidth peripherals to the bus of the processor in order to prove the system efficiency.
The Industrial Standard Architecture (ISA) us, a high efficient 16-bit I/O slot bus, was standardized by IBM in 1984. It makes the high efficient PC become popular. Considering the price and efficiency, 32-bit/64-bit PCI bus becomes the most popular and is widely accepted by PC users among various local buses. The PCI bus is a 32-bit or 64-bit multi-tasking bus and gradually takes the place of the conventional ISA bus.
However, the number of the PCI components that can be coupled to the PCI bus is limited when the price and efficiency are considered. Therefore, when the number of the PCI components increases, a number of the PCI buses are needed to fulfill the purpose. Nowadays, the PCI to PCI bridge is commonly used to connect the PCI buses to form the hierarchy structure in the high efficient PC.
The maximum number of components that can be connected to a conventional PCI bus is limited in 3xcx9c5. As a result, when a large r number of components is required, a PCI to PCI bridge is required to connect each PC I bus.
Referring to FIG. 1, it is a block diagram of the conventional computer system formed by utilizing a PCI bus. The PCI bus 100 is connected to a Central Processing Unit (CPU) 104, a cache 106, a Dynamic Random Access Memory (DRAM) 108 by a north bridge 102. Moreover, the PCI bus 100 is connected to a keyboard/mouse 112, a power controller 114, a Universal Serial Bus (USB) 116 by a south bridge 110 and is further connected to an outer network system 120 b y a network interface card 118. The north bridge 102 and the south bridge 110 are both he intelligent peripheral controlling chip sets. The north bridge 102 is used to process the system components that require higher efficiency, higher speed, and better performance. Referring to FIG. 1, when the number of the components connected to the computer system is large, the structure of the PCI to PCI bridge is utilized. If the network interface card is connected to the PCI to PCI bridge by another PCI bus, the computer system can not find the exact PCI bus that is connected to the network interface card even though the computer system supports the network interface card to be connected to the PCI bus. Therefore, the computer system can not effectively find the network interface card by another PCI bus to communicate with the network system.
FIG. 2 is a flowchart of the method of detecting the PCI bus in the conventional network system. As in the step 20, the computer system initializes the driver of the component connected to the PCI bus after loading it.
In the step 22, the operating system is called for and it is determined whether or not the system can find the component by the PCI bus. If the system can find the component by the PCI bus, the driver of the component connected to the PCI bus can be successfully started as shown in the step 24. If the ystem can not find the component by the PCI bus, the system fails to start the component as shown in the step 26. Therefore, the component can not be used as the Input/Output (I/O) peripheral of the main system.
It is therefore an object of the invention to provide a method of detecting the buses for all kinds of the operating systems to effectively load the information of the peripheral components to the operating system by the buses.
It is another object of the invention to provide a method of detecting the peripheral components in a computer system to effectively start the drivers of the peripheral components connected to the PCI bus.
It is yet another object of the invention to provide a method of effectively utilizing the PCI to PCI bridge to connect the PCI buses to form the hierarchy structure and effectively loading the information of the peripheral components to the computer system by the PCI buses-to start the drivers of the components.
According to the object of the invention, a method of detecting peripheral components for a computer system to effectively start a driver of a peripheral component connected to a first bus, wherein the computer system includes a number of second buses, includes the following steps. First, the computer system loads and initializes the driver of the peripheral component. Then, the information of the peripheral component is loaded by the first bus. When the computer system supports the information of the peripheral component, the driver of the peripheral component is started successfully by the computer system and the method of detecting is ended. If the computer system does not support information of the peripheral component, the computer system-starts to scan one of the first bus and the second buses. The computer system reads an In Input/Output (I/O) address of one of the first bus and the second buses. When the I/O address has the information of the peripheral component, the computer system starts the driver of the peripheral component successfully and the method of detecting is ended. If not all the buses are Scanned, the steps return to the step of scanning one of the first bus and the second buses. fall of the first bus and the second buses are scanned, the method of detecting is ended
According to another object of the invention , a method of detecting peripheral components connected to PCI buses for a computer system to effectively start a driver of a peripheral component connected to a first PCI us, wherein the computer system includes a number of second PCI buses, includes the following steps. First, the computer system loads the driver of the peripheral component and initializes the driver of the peripheral component. Next, the computer system loads information of the peripheral component by the first PCI bus. While the computer system supports the information of the peripheral component, the driver of the peripheral component is started successfully by the computer system and the method of detecting is ended. If the computer system does not support information of the peripheral component, the computer system starts to scan one of the first PCI us and the second PCI buses. The computer system reads an In Input/Output (I/O) address of one of the first PCI bus and the second PCI buses. When the I/O address has the information of the peripheral component, the computer system starts the driver of the peripheral component successfully and the method of detecting is ended. If not all the PCI buses are scanned, the steps return to the step of scanning one of the first PCI bus and the second PCI buses. If all of the first PCI bus and the second PCI buses are scanned, the method of detecting is ended.
According to yet another object of the invention, a method of detecting peripheral components connected to PCI buses of a computer system to effectively start a driver of a peripheral component connected to a first PCI bus, wherein the computer system includes a number of second PCI buses and a PCI to PCI bridge for connecting the first PCI bus and one of the second PCI buses, includes the following steps. First, the computer system loads the driver of the peripheral component by the first PCI bus. Then, the driver of the peripheral component is transmitted to one of the second PCI buses by the PCI to PCI bridge. If the computer system supports the information of the peripheral component, the computer system starts the peripheral component successfully and the method of detecting is ended. If the computer system does not support the information of the peripheral component, the computer system starts to scan orderly one of the first PCI bus and the second PCI buses. If all of the PCI buses are scanned, the steps return to the step of loading the driver of peripheral component by the first PCI bus. If all of the PCI buses are scanned, the method of detecting is ended.